<!DOCTYPE html>
<!-- saved from url=(0052)http://getbootstrap.com/docs/4.0/examples/dashboard/ -->
<html lang="en">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Dashboard Template for Bootstrap</title>
    <!-- Bootstrap core CSS -->
    <link th:href="@{/css/bootstrap.min.css}" rel="stylesheet">

    <!-- Custom styles for this template -->
    <link th:href="@{/css/dashboard.css}" rel="stylesheet">
</head>

<body>
<div th:replace="~{commons/commons::topbar}"></div>

<div class="container-fluid">
    <div class="row">
        <div th:replace="~{commons/commons::sidebar(active='addAdmin.html')}"></div>

        <main role="main" class="col-md-9 ml-sm-auto col-lg-10 pt-3 px-4">
            <form action="/admin/save" th:object="${addAdmin}" method="post">
                <div class="form-group">
                    <label>用户名</label>
                    <input type="text" class="form-control" name="userName"  >
                </div>
                <div class="form-group">
                    <label>密码</label>
                    <input type="text" class="form-control" name="password"  >
                </div>
                <div class="form-group">
                    <label>真实姓名</label>
                    <input type="text" class="form-control" name="realName"  >
                </div>
                <button class="btn btn-primary" type="submit">添加</button>
                <br/>
                <div class="table-responsive">
                    <table class="table table-striped table-sm">
                        <thead>
                        <tr>
                            <th>管理员账号</th>
                            <th>密码</th>
                            <th>账号所属</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr th:each="all : ${allAdmin}">
                            <td th:text="${all.getUserName()}"></td>
                            <td th:text="${all.getPassword()}"></td>
                            <td th:text="${all.getRealName()}"></td>
                            <td>
                                <a class="btn btn-sm btn-primary" th:href="@{/updateAdmin/}+${all.getUid()}">编辑</a>
                                <a class="btn btn-sm btn-danger" th:href="@{/delAdmin/}+${all.getUid()}">删除</a>

                            </td>
                        </tr>

                        </tbody>
                    </table>
                </div>
            </form>
        </main>
    </div>
</div>



</body>

</html>